package com.th.supcom.pds.impl.manager.impl;

import java.util.List;
import java.util.Map;

import net.carefx.fc.framework.db.manager.GetSequenceHelper;

import org.apache.ibatis.session.RowBounds;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.th.supcom.pds.domain.pojo.InpPhamApplyMaster;
import com.th.supcom.pds.domain.vo.InpPhamApplyMasterVO;
import com.th.supcom.pds.impl.dao.InpPhamApplyMasterMapper;
import com.th.supcom.pds.impl.manager.InpPhamApplyMasterManager;

/**
 * InpPhamApplyMaster 管理接口实现.
 * 
 * 住院摆药请领单.
 */
public class InpPhamApplyMasterManagerImpl implements InpPhamApplyMasterManager
{
    public static final String TAB_INP_PHAM_APPLY_MASTER = "INP_PHAM_APPLY_MASTER";

    private InpPhamApplyMasterMapper m_inpPhamApplyMasterMapper;

    /** 序列生成器. */
    private GetSequenceHelper m_getSequenceHelper;

    /**
     * 默认的构造函数.
     */
    public InpPhamApplyMasterManagerImpl ()
    {

    }

    /**
     * 获取InpPhamApplyMasterMapper.
     * 
     * @return InpPhamApplyMasterMapper.
     */
    public InpPhamApplyMasterMapper getInpPhamApplyMasterMapper ()
    {
        return m_inpPhamApplyMasterMapper;
    }

    /**
     * 注入InpPhamApplyMasterMapper.
     * 
     * @param inpPhamApplyMasterMapper set inpPhamApplyMasterMapper.
     */
    public void setInpPhamApplyMasterMapper (InpPhamApplyMasterMapper inpPhamApplyMasterMapper)
    {
        m_inpPhamApplyMasterMapper = inpPhamApplyMasterMapper;
    }

    /**
     * 获取序列.
     * 
     * @return GetSequenceHelper
     */
    public GetSequenceHelper getGetSequenceHelper ()
    {
        return m_getSequenceHelper;
    }

    /**
     * 注入序列.
     * 
     * @param getSequenceHelper getSequenceHelper.
     */
    public void setGetSequenceHelper (GetSequenceHelper getSequenceHelper)
    {
        m_getSequenceHelper = getSequenceHelper;
    }

    @Override
    public InpPhamApplyMaster getInpPhamApplyMasterByID (Long id)
    {
        return m_inpPhamApplyMasterMapper.getInpPhamApplyMasterByID (id);
    }

    @Override
    public Long getInpPhamApplyMasterSeq ()
    {
        return m_getSequenceHelper.getNextSequenceId (TAB_INP_PHAM_APPLY_MASTER);
    }

    @Override
    public List <InpPhamApplyMaster> findInpPhamApplyMasterListByExample (InpPhamApplyMaster inpPhamApplyMaster)
    {
        return m_inpPhamApplyMasterMapper.findInpPhamApplyMasterListByExample (inpPhamApplyMaster);
    }

    @Override
    public int findInpPhamApplyMasterCountByExample (InpPhamApplyMaster inpPhamApplyMaster)
    {
        return m_inpPhamApplyMasterMapper.findInpPhamApplyMasterCountByExample (inpPhamApplyMaster);
    }

    @Override
    public List <InpPhamApplyMaster> findInpPhamApplyMasterListByMap (Map <String, Object> params)
    {
        return m_inpPhamApplyMasterMapper.findInpPhamApplyMasterListByMap (params);
    }

    @Override
    public List <InpPhamApplyMaster> findInpPhamApplyMasterPagingByMap (Map <String, Object> params, Integer offset, Integer limit)
    {
        return m_inpPhamApplyMasterMapper.findInpPhamApplyMasterPagingByMap (new RowBounds (offset, limit), params);
    }

    @Override
    public Integer findInpPhamApplyMasterCountByMap (Map <String, Object> params)
    {
        return m_inpPhamApplyMasterMapper.findInpPhamApplyMasterCountByMap (params);
    }

    @Override
    public int modifyInpPhamApplyMaster (InpPhamApplyMaster inpPhamApplyMaster)
    {
        return m_inpPhamApplyMasterMapper.modifyInpPhamApplyMaster (inpPhamApplyMaster);
    }

    @Override
    public int modifyInpPhamApplyMasterByExample (InpPhamApplyMaster inpPhamApplyMaster)
    {
        return m_inpPhamApplyMasterMapper.modifyInpPhamApplyMasterByExample (inpPhamApplyMaster);
    }

    @Override
    public int removeInpPhamApplyMasterByID (Long id)
    {
        return m_inpPhamApplyMasterMapper.removeInpPhamApplyMasterByID (id);
    }

    @Override
    public int removeInpPhamApplyMasterByMap (Map <String, Object> params)
    {
        return m_inpPhamApplyMasterMapper.removeInpPhamApplyMasterByMap (params);
    }

    @Override
    public Long addInpPhamApplyMaster (InpPhamApplyMaster inpPhamApplyMaster)
    {
        Long seq = getInpPhamApplyMasterSeq ();
        inpPhamApplyMaster.setInpPhamApplyMasterId (seq);
        m_inpPhamApplyMasterMapper.addInpPhamApplyMaster (inpPhamApplyMaster);
        return seq;
    }

    @Override
    public List <InpPhamApplyMaster> findApplyMasterByNurseCodeAndDispensary (InpPhamApplyMasterVO inpPhamApplyMasterVO)
    {
        return m_inpPhamApplyMasterMapper.findApplyMasterByNurseCodeAndDispensary (inpPhamApplyMasterVO);
    }

    /** 日志记录器. */
    public static final Logger s_logger = LoggerFactory.getLogger (InpPhamApplyMasterManagerImpl.class);

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

}